<?php
/**
 * @var \Aqrun\HelloWorld\Blcok\Display $block
 */
?>
<style>
table {  font-family: arial, sans-serif;  border-collapse: collapse;  width: 100%;  margin-top: 30px;}
td, th {  border: 1px solid #dddddd;  text-align: left;  padding: 8px;  }
tr:nth-child(even) { background-color: #dddddd; }
.post-id{width:2%} .post-name{width:30%}

</style>
<div><?=$block->sayHello()?></div>
<table>
    <tr>
        <th class="post-id">ID</th>
        <th class="post-name">Name</th>
        <th>Content</th>
    </tr>
    <?php foreach($block->getPostCollection() as $key=>$post){?>
    <tr>
        <td><?=$post->getPostId()?></td>
        <td><?=$post->getName()?></td>
        <td><?=$post->getPostContent()?></td>
    </tr>
    <?php }?>
</table>